#ifndef CMDAPPDIALOG_H
#define CMDAPPDIALOG_H

#include <QDialog>

namespace Ui {
class CmdAppDialog;
}

class CmdAppDialog : public QDialog
{
    Q_OBJECT

public:
    explicit CmdAppDialog(QWidget *parent = nullptr);
    ~CmdAppDialog();

    bool isFinished() const { return isFinished_; }
    bool isCancel() const { return isCancel_; }
    void setCommand(QString const& cmdApp);
public slots:
    void progressText(QString const& text);
    void finished();
    void error(QString const& e);
    void setText(QString const& text, bool isError = false);
private:
    Ui::CmdAppDialog *ui;
    bool isFinished_;
    bool isCancel_;
    QString leaveText;
    bool isReturn;
};

#endif // CMDAPPDIALOG_H
